package com.syni.mdd.sjb.common.datatreaure.controller.protect;


import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckUserIdentity;
import com.syni.mdd.sjb.common.datatreaure.controller.BaseController;
import com.syni.mdd.sjb.common.datatreaure.entity.vo.rq.services.ViewRecordRqVo;
import com.syni.mdd.sjb.common.datatreaure.service.DxshAppUserViewService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 * 服务案例阅读记录 前端控制器
 * </p>
 *
 * @author hwq
 * @since 2020-08-05
 */
@RestController
@RequestMapping("/dxshAppUserView")
public class DxshAppUserViewController extends BaseController {

    @Autowired
    DxshAppUserViewService dxshAppUserViewService;

    @PostMapping("/userViewRecord")
    @ApiOperation(value = "记录商户查看案例时长")
    @CheckUserIdentity
    public Map<String,Object> userViewRecord(@RequestBody ViewRecordRqVo viewRecordRqVo){
        return dxshAppUserViewService.userViewRecord(viewRecordRqVo);
    }
}
